Skip to main content

Platform Support

CocoAntiVPN is a true multi-platform plugin supporting all major Minecraft server and proxy software.

Supported Platformsโ€‹

PlatformSupportedJava VersionNotes
Bukkitโœ…Java 17+1.20+
Spigotโœ…Java 17+1.20+
Paperโœ…Java 17+1.20+ (Recommended)
Foliaโœ…Java 17+Full async support
BungeeCordโœ…Java 17+Proxy-level protection
Velocityโœ…Java 17+Modern proxy support

Single Server Setupโ€‹

For standalone servers (no proxy), install CocoAntiVPN directly on your server.

Bukkit/Spigot/Paperโ€‹

  1. Download CocoAntiVPN.jar
  2. Place in plugins/ folder
  3. Start server
  4. Edit plugins/CocoAntiVPN/config.yml
  5. Run /antivpn reload

Foliaโ€‹

CocoAntiVPN is Folia-supported with native async handling:

# plugin.yml
folia-supported: true

All VPN checks are synchronous with timeouts, making it safe for Folia's regionized multithreading.


Proxy Network Setupโ€‹

For networks using BungeeCord or Velocity, install CocoAntiVPN on the proxy only.

Why Proxy-Level?โ€‹

Installing on the proxy provides several advantages:

  • โœ… Single Point of Control - One config for all servers
  • โœ… Early Detection - Block before reaching any backend server
  • โœ… Better Performance - Check once, not per-server
  • โœ… Unified Bypass List - One bypass database for the network
  • โœ… Shared Blacklist - Blocked IPs can't access any server

BungeeCord Installationโ€‹

  1. Download CocoAntiVPN.jar
  2. Place in BungeeCord's plugins/ folder
  3. Restart BungeeCord
  4. Edit plugins/CocoAntiVPN/config.yml
  5. Run /antivpn reload from console

Folder Structure:

bungee/
โ”œโ”€โ”€ plugins/
โ”‚ โ””โ”€โ”€ CocoAntiVPN/
โ”‚ โ”œโ”€โ”€ config.yml
โ”‚ โ””โ”€โ”€ data.db

Velocity Installationโ€‹

  1. Download CocoAntiVPN.jar
  2. Place in Velocity's plugins/ folder
  3. Restart Velocity
  4. Edit plugins/cocoantivpn/config.yml
  5. Run /antivpn reload from console

Folder Structure:

velocity/
โ”œโ”€โ”€ plugins/
โ”‚ โ””โ”€โ”€ cocoantivpn/
โ”‚ โ”œโ”€โ”€ config.yml
โ”‚ โ””โ”€โ”€ data.db
Case Sensitivity

Velocity uses lowercase folder names (cocoantivpn), while BungeeCord uses the plugin name (CocoAntiVPN).


Architecture Detailsโ€‹

Core Systemโ€‹

CocoAntiVPN uses a shared core across all platforms:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ AntiVPNCore โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ โ€ข VPNChecker (API + Cache) โ”‚
โ”‚ โ€ข SmoothRateLimiter โ”‚
โ”‚ โ€ข DatabaseManager (SQLite) โ”‚
โ”‚ โ€ข PlatformAdapter (Interface) โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ–ฒ โ–ฒ โ–ฒ
โ”‚ โ”‚ โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”
โ”‚ Bukkit โ”‚ โ”‚ Bungee โ”‚ โ”‚Velocityโ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Platform Componentsโ€‹

Each platform has specialized components:

ComponentBukkitBungeeCordVelocity
PluginBukkitPluginBungeePluginVelocityPlugin
CommandAntiVPNCommandBungeeCommandVelocityCommand
Login ListenerAsyncPlayerPreLoginEventPreLoginEventPreLoginEvent
Ping ListenerBukkitPingListenerBungeePingListenerVelocityPingListener
Netty InjectorBukkitNettyInjectorBungeeNettyInjectorVelocityNettyInjector

Databaseโ€‹

SQLite database stores:

  • Bypass List - Players who can skip VPN checks
  • Blacklist - IPs that were detected using VPN
-- Bypass table
CREATE TABLE bypass (player TEXT PRIMARY KEY COLLATE NOCASE)

-- Blacklist table
CREATE TABLE blacklist (ip TEXT PRIMARY KEY, blocked_at INTEGER)

Performance Considerationsโ€‹

Rate Limitingโ€‹

The smooth rate limiter prevents API abuse:

max-logins-per-second: 7

Uses a token bucket algorithm for smooth rate limiting without bursts.

Cachingโ€‹

VPN check results are cached with Caffeine:

cache-minutes: 10

Cache specifications:

  • Maximum entries: 50,000
  • Eviction: Time-based (configurable)
  • High-performance Caffeine cache

API Timeoutsโ€‹

VPN checks have built-in timeouts:

  • Connect timeout: 3 seconds
  • Request timeout: 2 seconds
  • Total check timeout: 5 seconds

If the API is slow, players are allowed to join (fail-open).


Troubleshootingโ€‹

Plugin Not Loadingโ€‹

Check Java Version:

java -version

Must be Java 17 or higher.

Commands Not Workingโ€‹

On Proxy:

  • Use console or ensure permissions plugin is installed
  • BungeeCord: Use LuckPerms BungeeCord version
  • Velocity: Use LuckPerms Velocity version

Players Not Being Checkedโ€‹

  1. Ensure api-key is set correctly
  2. Check console for API errors
  3. Verify plugin is on proxy (for networks)
  4. Check if player is in bypass list
  5. Check if IP is timing out (5 second limit)

High Memory Usageโ€‹

Reduce cache size by lowering cache-minutes:

cache-minutes: 5